package Lambda_Test;

public class test {
    public static void main(String[] args) {
        //调用匿名对象重写接口
        new Swim(){
            @Override
            public void swim()
            {
                System.out.println("匿名对象游泳");
            }
        }.swim();

        //使用lambda表达式
        Swim lambd = () -> System.out.println("lambda游泳");
        lambd.swim();

        Print cout = x -> System.out.print(x);
        cout.print(1000);
    }
}
